﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using TheHeInfo.Util;

namespace TheHeInfo.Master
{
    public partial class UcUserStatus : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                var data = Session[SessionNames.USER_DATA] as UserSessionData;
                if (data != null)
                {
                    btUserName.Text = data.UserTable.UserName;
                }
            }
        }

        protected void btLogout_Click(object sender, EventArgs e)
        {
            Session[SessionNames.USER_DATA] = null;
            Response.Redirect("~/Welcome.aspx");
        }

        protected void btUserName_Click(object sender, EventArgs e)
        {

        }
    }
}